{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting langchain-chroma\n",
      "  Downloading langchain_chroma-0.2.4-py3-none-any.whl.metadata (1.1 kB)\n",
      "Requirement already satisfied: langchain-core>=0.3.60 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from langchain-chroma) (0.3.67)\n",
      "Requirement already satisfied: numpy>=2.1.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from langchain-chroma) (2.3.1)\n",
      "Collecting chromadb>=1.0.9 (from langchain-chroma)\n",
      "  Downloading chromadb-1.0.15-cp39-abi3-win_amd64.whl.metadata (7.1 kB)\n",
      "Collecting build>=1.0.3 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading build-1.2.2.post1-py3-none-any.whl.metadata (6.5 kB)\n",
      "Requirement already satisfied: pydantic>=1.9 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from chromadb>=1.0.9->langchain-chroma) (2.10.3)\n",
      "Collecting pybase64>=1.4.1 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading pybase64-1.4.1-cp313-cp313-win_amd64.whl.metadata (8.7 kB)\n",
      "Collecting uvicorn>=0.18.3 (from uvicorn[standard]>=0.18.3->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading uvicorn-0.35.0-py3-none-any.whl.metadata (6.5 kB)\n",
      "Collecting posthog<6.0.0,>=2.4.0 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading posthog-5.4.0-py3-none-any.whl.metadata (5.7 kB)\n",
      "Requirement already satisfied: typing-extensions>=4.5.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from chromadb>=1.0.9->langchain-chroma) (4.12.2)\n",
      "Collecting onnxruntime>=1.14.1 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading onnxruntime-1.22.0-cp313-cp313-win_amd64.whl.metadata (5.0 kB)\n",
      "Collecting opentelemetry-api>=1.2.0 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading opentelemetry_api-1.34.1-py3-none-any.whl.metadata (1.5 kB)\n",
      "Collecting opentelemetry-exporter-otlp-proto-grpc>=1.2.0 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading opentelemetry_exporter_otlp_proto_grpc-1.34.1-py3-none-any.whl.metadata (2.4 kB)\n",
      "Collecting opentelemetry-sdk>=1.2.0 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading opentelemetry_sdk-1.34.1-py3-none-any.whl.metadata (1.6 kB)\n",
      "Collecting tokenizers>=0.13.2 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading tokenizers-0.21.2-cp39-abi3-win_amd64.whl.metadata (6.9 kB)\n",
      "Collecting pypika>=0.48.9 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading PyPika-0.48.9.tar.gz (67 kB)\n",
      "  Installing build dependencies: started\n",
      "  Installing build dependencies: finished with status 'done'\n",
      "  Getting requirements to build wheel: started\n",
      "  Getting requirements to build wheel: finished with status 'done'\n",
      "  Preparing metadata (pyproject.toml): started\n",
      "  Preparing metadata (pyproject.toml): finished with status 'done'\n",
      "Requirement already satisfied: tqdm>=4.65.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from chromadb>=1.0.9->langchain-chroma) (4.67.1)\n",
      "Collecting overrides>=7.3.1 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading overrides-7.7.0-py3-none-any.whl.metadata (5.8 kB)\n",
      "Collecting importlib-resources (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading importlib_resources-6.5.2-py3-none-any.whl.metadata (3.9 kB)\n",
      "Collecting grpcio>=1.58.0 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading grpcio-1.73.1-cp313-cp313-win_amd64.whl.metadata (4.0 kB)\n",
      "Collecting bcrypt>=4.0.1 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Using cached bcrypt-4.3.0-cp39-abi3-win_amd64.whl.metadata (10 kB)\n",
      "Collecting typer>=0.9.0 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading typer-0.16.0-py3-none-any.whl.metadata (15 kB)\n",
      "Collecting kubernetes>=28.1.0 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading kubernetes-33.1.0-py2.py3-none-any.whl.metadata (1.7 kB)\n",
      "Requirement already satisfied: tenacity>=8.2.3 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from chromadb>=1.0.9->langchain-chroma) (9.1.2)\n",
      "Requirement already satisfied: pyyaml>=6.0.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from chromadb>=1.0.9->langchain-chroma) (6.0.2)\n",
      "Collecting mmh3>=4.0.1 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading mmh3-5.1.0-cp313-cp313-win_amd64.whl.metadata (16 kB)\n",
      "Requirement already satisfied: orjson>=3.9.12 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from chromadb>=1.0.9->langchain-chroma) (3.10.18)\n",
      "Requirement already satisfied: httpx>=0.27.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from chromadb>=1.0.9->langchain-chroma) (0.28.1)\n",
      "Collecting rich>=10.11.0 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading rich-14.0.0-py3-none-any.whl.metadata (18 kB)\n",
      "Collecting jsonschema>=4.19.0 (from chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading jsonschema-4.24.0-py3-none-any.whl.metadata (7.8 kB)\n",
      "Requirement already satisfied: requests<3.0,>=2.7 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from posthog<6.0.0,>=2.4.0->chromadb>=1.0.9->langchain-chroma) (2.32.4)\n",
      "Requirement already satisfied: six>=1.5 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from posthog<6.0.0,>=2.4.0->chromadb>=1.0.9->langchain-chroma) (1.17.0)\n",
      "Requirement already satisfied: python-dateutil>=2.2 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from posthog<6.0.0,>=2.4.0->chromadb>=1.0.9->langchain-chroma) (2.9.0.post0)\n",
      "Collecting backoff>=1.10.0 (from posthog<6.0.0,>=2.4.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading backoff-2.2.1-py3-none-any.whl.metadata (14 kB)\n",
      "Requirement already satisfied: distro>=1.5.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from posthog<6.0.0,>=2.4.0->chromadb>=1.0.9->langchain-chroma) (1.9.0)\n",
      "Requirement already satisfied: charset_normalizer<4,>=2 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from requests<3.0,>=2.7->posthog<6.0.0,>=2.4.0->chromadb>=1.0.9->langchain-chroma) (3.4.2)\n",
      "Requirement already satisfied: idna<4,>=2.5 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from requests<3.0,>=2.7->posthog<6.0.0,>=2.4.0->chromadb>=1.0.9->langchain-chroma) (3.7)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from requests<3.0,>=2.7->posthog<6.0.0,>=2.4.0->chromadb>=1.0.9->langchain-chroma) (2.4.0)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from requests<3.0,>=2.7->posthog<6.0.0,>=2.4.0->chromadb>=1.0.9->langchain-chroma) (2025.4.26)\n",
      "Requirement already satisfied: packaging>=19.1 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from build>=1.0.3->chromadb>=1.0.9->langchain-chroma) (24.2)\n",
      "Collecting pyproject_hooks (from build>=1.0.3->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading pyproject_hooks-1.2.0-py3-none-any.whl.metadata (1.3 kB)\n",
      "Requirement already satisfied: colorama in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from build>=1.0.3->chromadb>=1.0.9->langchain-chroma) (0.4.6)\n",
      "Requirement already satisfied: anyio in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from httpx>=0.27.0->chromadb>=1.0.9->langchain-chroma) (4.7.0)\n",
      "Requirement already satisfied: httpcore==1.* in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from httpx>=0.27.0->chromadb>=1.0.9->langchain-chroma) (1.0.9)\n",
      "Requirement already satisfied: h11>=0.16 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from httpcore==1.*->httpx>=0.27.0->chromadb>=1.0.9->langchain-chroma) (0.16.0)\n",
      "Requirement already satisfied: attrs>=22.2.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from jsonschema>=4.19.0->chromadb>=1.0.9->langchain-chroma) (25.3.0)\n",
      "Collecting jsonschema-specifications>=2023.03.6 (from jsonschema>=4.19.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading jsonschema_specifications-2025.4.1-py3-none-any.whl.metadata (2.9 kB)\n",
      "Collecting referencing>=0.28.4 (from jsonschema>=4.19.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading referencing-0.36.2-py3-none-any.whl.metadata (2.8 kB)\n",
      "Collecting rpds-py>=0.7.1 (from jsonschema>=4.19.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading rpds_py-0.26.0-cp313-cp313-win_amd64.whl.metadata (4.3 kB)\n",
      "Collecting google-auth>=1.0.1 (from kubernetes>=28.1.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading google_auth-2.40.3-py2.py3-none-any.whl.metadata (6.2 kB)\n",
      "Collecting websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0 (from kubernetes>=28.1.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading websocket_client-1.8.0-py3-none-any.whl.metadata (8.0 kB)\n",
      "Collecting requests-oauthlib (from kubernetes>=28.1.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading requests_oauthlib-2.0.0-py2.py3-none-any.whl.metadata (11 kB)\n",
      "Collecting oauthlib>=3.2.2 (from kubernetes>=28.1.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading oauthlib-3.3.1-py3-none-any.whl.metadata (7.9 kB)\n",
      "Collecting durationpy>=0.7 (from kubernetes>=28.1.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading durationpy-0.10-py3-none-any.whl.metadata (340 bytes)\n",
      "Collecting cachetools<6.0,>=2.0.0 (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading cachetools-5.5.2-py3-none-any.whl.metadata (5.4 kB)\n",
      "Collecting pyasn1-modules>=0.2.1 (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading pyasn1_modules-0.4.2-py3-none-any.whl.metadata (3.5 kB)\n",
      "Collecting rsa<5,>=3.1.4 (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Using cached rsa-4.9.1-py3-none-any.whl.metadata (5.6 kB)\n",
      "Collecting pyasn1>=0.1.3 (from rsa<5,>=3.1.4->google-auth>=1.0.1->kubernetes>=28.1.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Using cached pyasn1-0.6.1-py3-none-any.whl.metadata (8.4 kB)\n",
      "Requirement already satisfied: langsmith>=0.3.45 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from langchain-core>=0.3.60->langchain-chroma) (0.4.4)\n",
      "Requirement already satisfied: jsonpatch<2.0,>=1.33 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from langchain-core>=0.3.60->langchain-chroma) (1.33)\n",
      "Requirement already satisfied: jsonpointer>=1.9 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from jsonpatch<2.0,>=1.33->langchain-core>=0.3.60->langchain-chroma) (3.0.0)\n",
      "Requirement already satisfied: requests-toolbelt<2.0.0,>=1.0.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from langsmith>=0.3.45->langchain-core>=0.3.60->langchain-chroma) (1.0.0)\n",
      "Requirement already satisfied: zstandard<0.24.0,>=0.23.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from langsmith>=0.3.45->langchain-core>=0.3.60->langchain-chroma) (0.23.0)\n",
      "Requirement already satisfied: annotated-types>=0.6.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from pydantic>=1.9->chromadb>=1.0.9->langchain-chroma) (0.6.0)\n",
      "Requirement already satisfied: pydantic-core==2.27.1 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from pydantic>=1.9->chromadb>=1.0.9->langchain-chroma) (2.27.1)\n",
      "Collecting coloredlogs (from onnxruntime>=1.14.1->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading coloredlogs-15.0.1-py2.py3-none-any.whl.metadata (12 kB)\n",
      "Collecting flatbuffers (from onnxruntime>=1.14.1->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading flatbuffers-25.2.10-py2.py3-none-any.whl.metadata (875 bytes)\n",
      "Collecting protobuf (from onnxruntime>=1.14.1->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading protobuf-6.31.1-cp310-abi3-win_amd64.whl.metadata (593 bytes)\n",
      "Collecting sympy (from onnxruntime>=1.14.1->chromadb>=1.0.9->langchain-chroma)\n",
      "  Using cached sympy-1.14.0-py3-none-any.whl.metadata (12 kB)\n",
      "Collecting importlib-metadata<8.8.0,>=6.0 (from opentelemetry-api>=1.2.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading importlib_metadata-8.7.0-py3-none-any.whl.metadata (4.8 kB)\n",
      "Collecting zipp>=3.20 (from importlib-metadata<8.8.0,>=6.0->opentelemetry-api>=1.2.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading zipp-3.23.0-py3-none-any.whl.metadata (3.6 kB)\n",
      "Collecting googleapis-common-protos~=1.52 (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading googleapis_common_protos-1.70.0-py3-none-any.whl.metadata (9.3 kB)\n",
      "Collecting opentelemetry-exporter-otlp-proto-common==1.34.1 (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading opentelemetry_exporter_otlp_proto_common-1.34.1-py3-none-any.whl.metadata (1.9 kB)\n",
      "Collecting opentelemetry-proto==1.34.1 (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading opentelemetry_proto-1.34.1-py3-none-any.whl.metadata (2.4 kB)\n",
      "Collecting protobuf (from onnxruntime>=1.14.1->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading protobuf-5.29.5-cp310-abi3-win_amd64.whl.metadata (592 bytes)\n",
      "Collecting opentelemetry-semantic-conventions==0.55b1 (from opentelemetry-sdk>=1.2.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading opentelemetry_semantic_conventions-0.55b1-py3-none-any.whl.metadata (2.5 kB)\n",
      "Collecting markdown-it-py>=2.2.0 (from rich>=10.11.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading markdown_it_py-3.0.0-py3-none-any.whl.metadata (6.9 kB)\n",
      "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from rich>=10.11.0->chromadb>=1.0.9->langchain-chroma) (2.19.2)\n",
      "Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich>=10.11.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading mdurl-0.1.2-py3-none-any.whl.metadata (1.6 kB)\n",
      "Collecting huggingface-hub<1.0,>=0.16.4 (from tokenizers>=0.13.2->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading huggingface_hub-0.33.2-py3-none-any.whl.metadata (14 kB)\n",
      "Collecting filelock (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.2->chromadb>=1.0.9->langchain-chroma)\n",
      "  Using cached filelock-3.18.0-py3-none-any.whl.metadata (2.9 kB)\n",
      "Collecting fsspec>=2023.5.0 (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.2->chromadb>=1.0.9->langchain-chroma)\n",
      "  Using cached fsspec-2025.5.1-py3-none-any.whl.metadata (11 kB)\n",
      "Collecting click>=8.0.0 (from typer>=0.9.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Using cached click-8.2.1-py3-none-any.whl.metadata (2.5 kB)\n",
      "Collecting shellingham>=1.3.0 (from typer>=0.9.0->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading shellingham-1.5.4-py2.py3-none-any.whl.metadata (3.5 kB)\n",
      "Collecting httptools>=0.6.3 (from uvicorn[standard]>=0.18.3->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading httptools-0.6.4-cp313-cp313-win_amd64.whl.metadata (3.7 kB)\n",
      "Requirement already satisfied: python-dotenv>=0.13 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from uvicorn[standard]>=0.18.3->chromadb>=1.0.9->langchain-chroma) (1.1.0)\n",
      "Collecting watchfiles>=0.13 (from uvicorn[standard]>=0.18.3->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading watchfiles-1.1.0-cp313-cp313-win_amd64.whl.metadata (5.0 kB)\n",
      "Collecting websockets>=10.4 (from uvicorn[standard]>=0.18.3->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading websockets-15.0.1-cp313-cp313-win_amd64.whl.metadata (7.0 kB)\n",
      "Requirement already satisfied: sniffio>=1.1 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from anyio->httpx>=0.27.0->chromadb>=1.0.9->langchain-chroma) (1.3.0)\n",
      "Collecting humanfriendly>=9.1 (from coloredlogs->onnxruntime>=1.14.1->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading humanfriendly-10.0-py2.py3-none-any.whl.metadata (9.2 kB)\n",
      "Collecting pyreadline3 (from humanfriendly>=9.1->coloredlogs->onnxruntime>=1.14.1->chromadb>=1.0.9->langchain-chroma)\n",
      "  Downloading pyreadline3-3.5.4-py3-none-any.whl.metadata (4.7 kB)\n",
      "Collecting mpmath<1.4,>=1.1.0 (from sympy->onnxruntime>=1.14.1->chromadb>=1.0.9->langchain-chroma)\n",
      "  Using cached mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)\n",
      "Downloading langchain_chroma-0.2.4-py3-none-any.whl (11 kB)\n",
      "Downloading chromadb-1.0.15-cp39-abi3-win_amd64.whl (19.5 MB)\n",
      "   ---------------------------------------- 0.0/19.5 MB ? eta -:--:--\n",
      "   ---------------------------------------- 0.0/19.5 MB ? eta -:--:--\n",
      "   ---------------------------------------- 0.0/19.5 MB ? eta -:--:--\n",
      "   - -------------------------------------- 0.5/19.5 MB 1.5 MB/s eta 0:00:13\n",
      "   -- ------------------------------------- 1.0/19.5 MB 2.2 MB/s eta 0:00:09\n",
      "   ----- ---------------------------------- 2.9/19.5 MB 4.2 MB/s eta 0:00:04\n",
      "   ------------ --------------------------- 6.3/19.5 MB 7.2 MB/s eta 0:00:02\n",
      "   ------------------- -------------------- 9.4/19.5 MB 9.0 MB/s eta 0:00:02\n",
      "   -------------------------- ------------- 12.8/19.5 MB 9.8 MB/s eta 0:00:01\n",
      "   ---------------------------------- ----- 16.8/19.5 MB 11.1 MB/s eta 0:00:01\n",
      "   ---------------------------------------  19.4/19.5 MB 11.5 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 19.5/19.5 MB 11.2 MB/s eta 0:00:00\n",
      "Downloading posthog-5.4.0-py3-none-any.whl (105 kB)\n",
      "Downloading backoff-2.2.1-py3-none-any.whl (15 kB)\n",
      "Using cached bcrypt-4.3.0-cp39-abi3-win_amd64.whl (152 kB)\n",
      "Downloading build-1.2.2.post1-py3-none-any.whl (22 kB)\n",
      "Downloading grpcio-1.73.1-cp313-cp313-win_amd64.whl (4.3 MB)\n",
      "   ---------------------------------------- 0.0/4.3 MB ? eta -:--:--\n",
      "   ------------------------------------ --- 3.9/4.3 MB 30.9 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 4.3/4.3 MB 17.2 MB/s eta 0:00:00\n",
      "Downloading jsonschema-4.24.0-py3-none-any.whl (88 kB)\n",
      "Downloading jsonschema_specifications-2025.4.1-py3-none-any.whl (18 kB)\n",
      "Downloading kubernetes-33.1.0-py2.py3-none-any.whl (1.9 MB)\n",
      "   ---------------------------------------- 0.0/1.9 MB ? eta -:--:--\n",
      "   ---------------------------------------- 1.9/1.9 MB 22.5 MB/s eta 0:00:00\n",
      "Downloading durationpy-0.10-py3-none-any.whl (3.9 kB)\n",
      "Downloading google_auth-2.40.3-py2.py3-none-any.whl (216 kB)\n",
      "Downloading cachetools-5.5.2-py3-none-any.whl (10 kB)\n",
      "Using cached rsa-4.9.1-py3-none-any.whl (34 kB)\n",
      "Downloading mmh3-5.1.0-cp313-cp313-win_amd64.whl (41 kB)\n",
      "Downloading oauthlib-3.3.1-py3-none-any.whl (160 kB)\n",
      "Downloading onnxruntime-1.22.0-cp313-cp313-win_amd64.whl (12.7 MB)\n",
      "   ---------------------------------------- 0.0/12.7 MB ? eta -:--:--\n",
      "   ------------- -------------------------- 4.2/12.7 MB 19.5 MB/s eta 0:00:01\n",
      "   ------------------------ --------------- 7.9/12.7 MB 18.4 MB/s eta 0:00:01\n",
      "   -------------------------------------- - 12.1/12.7 MB 18.7 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 12.7/12.7 MB 17.2 MB/s eta 0:00:00\n",
      "Downloading opentelemetry_api-1.34.1-py3-none-any.whl (65 kB)\n",
      "Downloading importlib_metadata-8.7.0-py3-none-any.whl (27 kB)\n",
      "Downloading opentelemetry_exporter_otlp_proto_grpc-1.34.1-py3-none-any.whl (18 kB)\n",
      "Downloading opentelemetry_exporter_otlp_proto_common-1.34.1-py3-none-any.whl (18 kB)\n",
      "Downloading opentelemetry_proto-1.34.1-py3-none-any.whl (55 kB)\n",
      "Downloading googleapis_common_protos-1.70.0-py3-none-any.whl (294 kB)\n",
      "Downloading opentelemetry_sdk-1.34.1-py3-none-any.whl (118 kB)\n",
      "Downloading opentelemetry_semantic_conventions-0.55b1-py3-none-any.whl (196 kB)\n",
      "Downloading protobuf-5.29.5-cp310-abi3-win_amd64.whl (434 kB)\n",
      "Downloading overrides-7.7.0-py3-none-any.whl (17 kB)\n",
      "Using cached pyasn1-0.6.1-py3-none-any.whl (83 kB)\n",
      "Downloading pyasn1_modules-0.4.2-py3-none-any.whl (181 kB)\n",
      "Downloading pybase64-1.4.1-cp313-cp313-win_amd64.whl (36 kB)\n",
      "Downloading referencing-0.36.2-py3-none-any.whl (26 kB)\n",
      "Downloading rich-14.0.0-py3-none-any.whl (243 kB)\n",
      "Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)\n",
      "Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)\n",
      "Downloading rpds_py-0.26.0-cp313-cp313-win_amd64.whl (234 kB)\n",
      "Downloading tokenizers-0.21.2-cp39-abi3-win_amd64.whl (2.5 MB)\n",
      "   ---------------------------------------- 0.0/2.5 MB ? eta -:--:--\n",
      "   ---------------------------------------- 2.5/2.5 MB 23.5 MB/s eta 0:00:00\n",
      "Downloading huggingface_hub-0.33.2-py3-none-any.whl (515 kB)\n",
      "Using cached fsspec-2025.5.1-py3-none-any.whl (199 kB)\n",
      "Downloading typer-0.16.0-py3-none-any.whl (46 kB)\n",
      "Using cached click-8.2.1-py3-none-any.whl (102 kB)\n",
      "Downloading shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)\n",
      "Downloading uvicorn-0.35.0-py3-none-any.whl (66 kB)\n",
      "Downloading httptools-0.6.4-cp313-cp313-win_amd64.whl (87 kB)\n",
      "Downloading watchfiles-1.1.0-cp313-cp313-win_amd64.whl (292 kB)\n",
      "Downloading websocket_client-1.8.0-py3-none-any.whl (58 kB)\n",
      "Downloading websockets-15.0.1-cp313-cp313-win_amd64.whl (176 kB)\n",
      "Downloading zipp-3.23.0-py3-none-any.whl (10 kB)\n",
      "Downloading coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)\n",
      "Downloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)\n",
      "Using cached filelock-3.18.0-py3-none-any.whl (16 kB)\n",
      "Downloading flatbuffers-25.2.10-py2.py3-none-any.whl (30 kB)\n",
      "Downloading importlib_resources-6.5.2-py3-none-any.whl (37 kB)\n",
      "Downloading pyproject_hooks-1.2.0-py3-none-any.whl (10 kB)\n",
      "Downloading pyreadline3-3.5.4-py3-none-any.whl (83 kB)\n",
      "Downloading requests_oauthlib-2.0.0-py2.py3-none-any.whl (24 kB)\n",
      "Using cached sympy-1.14.0-py3-none-any.whl (6.3 MB)\n",
      "Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)\n",
      "Building wheels for collected packages: pypika\n",
      "  Building wheel for pypika (pyproject.toml): started\n",
      "  Building wheel for pypika (pyproject.toml): finished with status 'done'\n",
      "  Created wheel for pypika: filename=pypika-0.48.9-py2.py3-none-any.whl size=53916 sha256=3b64525fa1279460e780f6a4fc246c78d2741d6ac6bc926348afe9ec111059e6\n",
      "  Stored in directory: c:\\users\\lenovo\\appdata\\local\\pip\\cache\\wheels\\b4\\f8\\a5\\28e9c1524d320f4b8eefdce0e487b5c2e128dbf2ed1bb4a60b\n",
      "Successfully built pypika\n",
      "Installing collected packages: pypika, mpmath, flatbuffers, durationpy, zipp, websockets, websocket-client, sympy, shellingham, rpds-py, pyreadline3, pyproject_hooks, pybase64, pyasn1, protobuf, overrides, oauthlib, mmh3, mdurl, importlib-resources, httptools, grpcio, fsspec, filelock, click, cachetools, bcrypt, backoff, watchfiles, uvicorn, rsa, requests-oauthlib, referencing, pyasn1-modules, posthog, opentelemetry-proto, markdown-it-py, importlib-metadata, humanfriendly, huggingface-hub, googleapis-common-protos, build, tokenizers, rich, opentelemetry-exporter-otlp-proto-common, opentelemetry-api, jsonschema-specifications, google-auth, coloredlogs, typer, opentelemetry-semantic-conventions, onnxruntime, kubernetes, jsonschema, opentelemetry-sdk, opentelemetry-exporter-otlp-proto-grpc, chromadb, langchain-chroma\n",
      "\n",
      "    ---------------------------------------  1/58 [mpmath]\n",
      "    ---------------------------------------  1/58 [mpmath]\n",
      "    ---------------------------------------  1/58 [mpmath]\n",
      "    ---------------------------------------  1/58 [mpmath]\n",
      "   - --------------------------------------  2/58 [flatbuffers]\n",
      "   --- ------------------------------------  5/58 [websockets]\n",
      "   ---- -----------------------------------  6/58 [websocket-client]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ---- -----------------------------------  7/58 [sympy]\n",
      "   ------ --------------------------------- 10/58 [pyreadline3]\n",
      "   -------- ------------------------------- 13/58 [pyasn1]\n",
      "   --------- ------------------------------ 14/58 [protobuf]\n",
      "   --------- ------------------------------ 14/58 [protobuf]\n",
      "   ----------- ---------------------------- 16/58 [oauthlib]\n",
      "   ----------- ---------------------------- 17/58 [mmh3]\n",
      "   -------------- ------------------------- 21/58 [grpcio]\n",
      "   -------------- ------------------------- 21/58 [grpcio]\n",
      "   --------------- ------------------------ 22/58 [fsspec]\n",
      "   --------------- ------------------------ 22/58 [fsspec]\n",
      "   ---------------- ----------------------- 24/58 [click]\n",
      "   -------------------- ------------------- 29/58 [uvicorn]\n",
      "   -------------------- ------------------- 30/58 [rsa]\n",
      "   ---------------------- ----------------- 33/58 [pyasn1-modules]\n",
      "   ---------------------- ----------------- 33/58 [pyasn1-modules]\n",
      "   ---------------------- ----------------- 33/58 [pyasn1-modules]\n",
      "   ----------------------- ---------------- 34/58 [posthog]\n",
      "   ------------------------ --------------- 35/58 [opentelemetry-proto]\n",
      "   ------------------------ --------------- 36/58 [markdown-it-py]\n",
      "   -------------------------- ------------- 38/58 [humanfriendly]\n",
      "   -------------------------- ------------- 39/58 [huggingface-hub]\n",
      "   -------------------------- ------------- 39/58 [huggingface-hub]\n",
      "   -------------------------- ------------- 39/58 [huggingface-hub]\n",
      "   --------------------------- ------------ 40/58 [googleapis-common-protos]\n",
      "   ---------------------------- ----------- 41/58 [build]\n",
      "   ----------------------------- ---------- 43/58 [rich]\n",
      "   ----------------------------- ---------- 43/58 [rich]\n",
      "   ----------------------------- ---------- 43/58 [rich]\n",
      "   ------------------------------- -------- 46/58 [jsonschema-specifications]\n",
      "   -------------------------------- ------- 47/58 [google-auth]\n",
      "   --------------------------------- ------ 49/58 [typer]\n",
      "   ---------------------------- ---- 50/58 [opentelemetry-semantic-conventions]\n",
      "   ----------------------------------- ---- 51/58 [onnxruntime]\n",
      "   ----------------------------------- ---- 51/58 [onnxruntime]\n",
      "   ----------------------------------- ---- 51/58 [onnxruntime]\n",
      "   ----------------------------------- ---- 51/58 [onnxruntime]\n",
      "   ----------------------------------- ---- 51/58 [onnxruntime]\n",
      "   ----------------------------------- ---- 51/58 [onnxruntime]\n",
      "   ----------------------------------- ---- 51/58 [onnxruntime]\n",
      "   ----------------------------------- ---- 51/58 [onnxruntime]\n",
      "   ----------------------------------- ---- 51/58 [onnxruntime]\n",
      "   ----------------------------------- ---- 51/58 [onnxruntime]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ----------------------------------- ---- 52/58 [kubernetes]\n",
      "   ------------------------------------ --- 53/58 [jsonschema]\n",
      "   ------------------------------------- -- 54/58 [opentelemetry-sdk]\n",
      "   --------------------------- - 55/58 [opentelemetry-exporter-otlp-proto-grpc]\n",
      "   -------------------------------------- - 56/58 [chromadb]\n",
      "   -------------------------------------- - 56/58 [chromadb]\n",
      "   -------------------------------------- - 56/58 [chromadb]\n",
      "   -------------------------------------- - 56/58 [chromadb]\n",
      "   -------------------------------------- - 56/58 [chromadb]\n",
      "   -------------------------------------- - 56/58 [chromadb]\n",
      "   ---------------------------------------- 58/58 [langchain-chroma]\n",
      "\n",
      "Successfully installed backoff-2.2.1 bcrypt-4.3.0 build-1.2.2.post1 cachetools-5.5.2 chromadb-1.0.15 click-8.2.1 coloredlogs-15.0.1 durationpy-0.10 filelock-3.18.0 flatbuffers-25.2.10 fsspec-2025.5.1 google-auth-2.40.3 googleapis-common-protos-1.70.0 grpcio-1.73.1 httptools-0.6.4 huggingface-hub-0.33.2 humanfriendly-10.0 importlib-metadata-8.7.0 importlib-resources-6.5.2 jsonschema-4.24.0 jsonschema-specifications-2025.4.1 kubernetes-33.1.0 langchain-chroma-0.2.4 markdown-it-py-3.0.0 mdurl-0.1.2 mmh3-5.1.0 mpmath-1.3.0 oauthlib-3.3.1 onnxruntime-1.22.0 opentelemetry-api-1.34.1 opentelemetry-exporter-otlp-proto-common-1.34.1 opentelemetry-exporter-otlp-proto-grpc-1.34.1 opentelemetry-proto-1.34.1 opentelemetry-sdk-1.34.1 opentelemetry-semantic-conventions-0.55b1 overrides-7.7.0 posthog-5.4.0 protobuf-5.29.5 pyasn1-0.6.1 pyasn1-modules-0.4.2 pybase64-1.4.1 pypika-0.48.9 pyproject_hooks-1.2.0 pyreadline3-3.5.4 referencing-0.36.2 requests-oauthlib-2.0.0 rich-14.0.0 rpds-py-0.26.0 rsa-4.9.1 shellingham-1.5.4 sympy-1.14.0 tokenizers-0.21.2 typer-0.16.0 uvicorn-0.35.0 watchfiles-1.1.0 websocket-client-1.8.0 websockets-15.0.1 zipp-3.23.0\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "pip install langchain-chroma"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting sentence-transformers\n",
      "  Using cached sentence_transformers-5.0.0-py3-none-any.whl.metadata (16 kB)\n",
      "Collecting transformers<5.0.0,>=4.41.0 (from sentence-transformers)\n",
      "  Using cached transformers-4.53.0-py3-none-any.whl.metadata (39 kB)\n",
      "Requirement already satisfied: tqdm in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from sentence-transformers) (4.67.1)\n",
      "Collecting torch>=1.11.0 (from sentence-transformers)\n",
      "  Using cached torch-2.7.1-cp313-cp313-win_amd64.whl.metadata (28 kB)\n",
      "Requirement already satisfied: scikit-learn in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from sentence-transformers) (1.7.0)\n",
      "Requirement already satisfied: scipy in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from sentence-transformers) (1.16.0)\n",
      "Requirement already satisfied: huggingface-hub>=0.20.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from sentence-transformers) (0.33.2)\n",
      "Requirement already satisfied: Pillow in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from sentence-transformers) (11.3.0)\n",
      "Requirement already satisfied: typing_extensions>=4.5.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from sentence-transformers) (4.12.2)\n",
      "Requirement already satisfied: filelock in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (3.18.0)\n",
      "Requirement already satisfied: numpy>=1.17 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (2.3.1)\n",
      "Requirement already satisfied: packaging>=20.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (24.2)\n",
      "Requirement already satisfied: pyyaml>=5.1 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (6.0.2)\n",
      "Requirement already satisfied: regex!=2019.12.17 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (2024.11.6)\n",
      "Requirement already satisfied: requests in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (2.32.4)\n",
      "Requirement already satisfied: tokenizers<0.22,>=0.21 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (0.21.2)\n",
      "Requirement already satisfied: safetensors>=0.4.3 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (0.5.3)\n",
      "Requirement already satisfied: fsspec>=2023.5.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from huggingface-hub>=0.20.0->sentence-transformers) (2025.5.1)\n",
      "Requirement already satisfied: sympy>=1.13.3 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from torch>=1.11.0->sentence-transformers) (1.14.0)\n",
      "Requirement already satisfied: networkx in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from torch>=1.11.0->sentence-transformers) (3.5)\n",
      "Requirement already satisfied: jinja2 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from torch>=1.11.0->sentence-transformers) (3.1.6)\n",
      "Requirement already satisfied: setuptools in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from torch>=1.11.0->sentence-transformers) (78.1.1)\n",
      "Requirement already satisfied: mpmath<1.4,>=1.1.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from sympy>=1.13.3->torch>=1.11.0->sentence-transformers) (1.3.0)\n",
      "Requirement already satisfied: colorama in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from tqdm->sentence-transformers) (0.4.6)\n",
      "Requirement already satisfied: MarkupSafe>=2.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from jinja2->torch>=1.11.0->sentence-transformers) (3.0.2)\n",
      "Requirement already satisfied: charset_normalizer<4,>=2 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from requests->transformers<5.0.0,>=4.41.0->sentence-transformers) (3.4.2)\n",
      "Requirement already satisfied: idna<4,>=2.5 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from requests->transformers<5.0.0,>=4.41.0->sentence-transformers) (3.7)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from requests->transformers<5.0.0,>=4.41.0->sentence-transformers) (2.4.0)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from requests->transformers<5.0.0,>=4.41.0->sentence-transformers) (2025.4.26)\n",
      "Requirement already satisfied: joblib>=1.2.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from scikit-learn->sentence-transformers) (1.5.1)\n",
      "Requirement already satisfied: threadpoolctl>=3.1.0 in d:\\users\\lenovo\\anaconda3\\envs\\llm\\lib\\site-packages (from scikit-learn->sentence-transformers) (3.6.0)\n",
      "Using cached sentence_transformers-5.0.0-py3-none-any.whl (470 kB)\n",
      "Using cached transformers-4.53.0-py3-none-any.whl (10.8 MB)\n",
      "Using cached torch-2.7.1-cp313-cp313-win_amd64.whl (216.1 MB)\n",
      "Installing collected packages: torch, transformers, sentence-transformers\n",
      "\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ---------------------------------------- 0/3 [torch]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   ------------- -------------------------- 1/3 [transformers]\n",
      "   -------------------------- ------------- 2/3 [sentence-transformers]\n",
      "   -------------------------- ------------- 2/3 [sentence-transformers]\n",
      "   -------------------------- ------------- 2/3 [sentence-transformers]\n",
      "   -------------------------- ------------- 2/3 [sentence-transformers]\n",
      "   ---------------------------------------- 3/3 [sentence-transformers]\n",
      "\n",
      "Successfully installed sentence-transformers-5.0.0 torch-2.7.1 transformers-4.53.0\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "pip install sentence-transformers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "d:\\Users\\Lenovo\\anaconda3\\envs\\LLM\\Lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
      "  from .autonotebook import tqdm as notebook_tqdm\n",
      "d:\\Users\\Lenovo\\anaconda3\\envs\\LLM\\Lib\\site-packages\\huggingface_hub\\file_download.py:143: UserWarning: `huggingface_hub` cache-system uses symlinks by default to efficiently store duplicated files but your machine does not support them in C:\\Users\\Lenovo\\.cache\\huggingface\\hub\\models--sentence-transformers--all-MiniLM-L6-v2. Caching files will still work but in a degraded version that might require more space on your disk. This warning can be disabled by setting the `HF_HUB_DISABLE_SYMLINKS_WARNING` environment variable. For more details, see https://huggingface.co/docs/huggingface_hub/how-to-cache#limitations.\n",
      "To support symlinks on Windows, you either need to activate Developer Mode or to run Python as an administrator. In order to activate developer mode, see this article: https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development\n",
      "  warnings.warn(message)\n",
      "Xet Storage is enabled for this repo, but the 'hf_xet' package is not installed. Falling back to regular HTTP download. For better performance, install the package with: `pip install huggingface_hub[hf_xet]` or `pip install hf_xet`\n",
      "C:\\Users\\Lenovo\\AppData\\Local\\Temp\\ipykernel_35580\\4187594295.py:23: LangChainDeprecationWarning: The method `BaseRetriever.get_relevant_documents` was deprecated in langchain-core 0.1.46 and will be removed in 1.0. Use :meth:`~invoke` instead.\n",
      "  results = retriever.get_relevant_documents(query)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "结果 1: LangChain 是一个强大的 LLM 应用开发框架。\n",
      "结果 2: Chroma 是一个开源的向量数据库。\n",
      "结果 3: Retriever 用于从知识库中检索相关内容。\n"
     ]
    }
   ],
   "source": [
    "from langchain_community.vectorstores import Chroma\n",
    "from langchain_community.embeddings import HuggingFaceEmbeddings\n",
    "from langchain_core.documents import Document\n",
    "\n",
    "# 1. 创建嵌入模型\n",
    "embeddings = HuggingFaceEmbeddings(model_name=\"sentence-transformers/all-MiniLM-L6-v2\")\n",
    "\n",
    "# 2. 构建文档列表\n",
    "docs = [\n",
    "    Document(page_content=\"LangChain 是一个强大的 LLM 应用开发框架。\"),\n",
    "    Document(page_content=\"Chroma 是一个开源的向量数据库。\"),\n",
    "    Document(page_content=\"Retriever 用于从知识库中检索相关内容。\"),\n",
    "]\n",
    "\n",
    "# 3. 创建 Chroma 向量数据库并插入文档\n",
    "vectorstore = Chroma.from_documents(docs, embeddings, persist_directory=\"./chroma_db\")\n",
    "\n",
    "# 4. 创建 Retriever\n",
    "retriever = vectorstore.as_retriever()\n",
    "\n",
    "# 5. 检索相关内容\n",
    "query = \"什么是检索器？\"\n",
    "results = retriever.get_relevant_documents(query)\n",
    "\n",
    "# 6. 输出检索结果\n",
    "for i, doc in enumerate(results):\n",
    "    print(f\"结果 {i+1}: {doc.page_content}\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "LLM",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
